"""
复杂的正则表达式
"""
import re
# 账号类型：字母或数字，6~10位

r="^[0-9a-zA-Z]{6,10}$"
result1=re.findall(r,"sdfsdf12345")
print(result1)


# QQ号码，5~11位，首位不能是0
r=r"^[1-9]\d{4,10}$"
result2=re.findall(r,"49441211")
print(result2)

# 电子邮箱，只能是QQ/163/gmail
r=r"(^[\w-]+(\.[\w-]+)*@(qq|163|gmail)(\.[\w-]+)+$)"
result3=re.findall(r,"a.b.c.d@qq.com")
print(result3)
result3=re.match(r,"555@163.com.cn")
print(result3)
result3=re.match(r,"555@126.com.cn")
print(result3)